package cn.howxu.yichen_ovo.common.block;

import cn.howxu.yichen_ovo.init.ModSounds;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SimpleWaterloggedBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;

@SuppressWarnings("deprecation")
/**
 * @description: TODO
 * @author: HowXu
 * @date: 2025/9/12 18:22
 */
public class HowXuDoll extends Doll{
    private static final float BASE_VOLUME = 1.0f;
    private static final float PITCH_VARIANCE = 0.5f;
    private static final float BASE_PITCH = 0.75f;

    public HowXuDoll() {
        super();
    }
    
    /**
     * 播放玩偶音效
     */
    @Override
    protected void playDollSound(ServerLevel serverLevel, BlockPos blockPos) {
        float pitch = BASE_PITCH + serverLevel.random.nextFloat() * PITCH_VARIANCE;
        // 播放音乐这里卡一下
        serverLevel.playSound(null, blockPos, ModSounds.BSXLYYQ.get(), SoundSource.BLOCKS, BASE_VOLUME, pitch);
    }
}

